Procedural macros for Exonum
This crate provides several procedural macros for Exonum core and Exonum services.
Overview of presented macros:
BinaryValue
: derive macro forBinaryValue
trait of MerkleDB. Depending on codec, the implementation may useProtobufConvert
trait as base (default), orserde
traits usingbincode
.ObjectHash
: derive macro forObjectHash
trait of MerkleDB. It can be used for any type that implementsBinaryValue
trait.FromAccess
: derive macro forFromAccess
trait for schemas of MerkleDB indexes.ServiceDispatcher
: derive macro for generating dispatching mechanisms of Rust Exonum services.ServiceFactory
: derive macro for generating factory mechanisms of Rust Exonum services.exonum_interface
: attribute macro for transforming trait into interface of Rust Exonum service.ExecutionFail
: derive macro similar tofailure::Fail
, implementingExecutionFail
trait for an enum.RequireArtifact
: derive macro forRequireArtifact
trait.
Consult the crate docs for more details.
Usage
Include exonum-derive
as a dependency in your Cargo.toml
:
[]
= "1.0.0"
License
exonum-derive
is licensed under the Apache License (Version 2.0).
See LICENSE for details.